/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package register.ucm;
import register.model.InputValueModel;

/**
 *
 * @author Vitamin
 */
public class GenerateDegreeCode {

    private InputValueModel value;
    private String tp;

    public GenerateDegreeCode(InputValueModel temp)
    {
        value=temp;
    }

    public String generateDegree()
    {
        if(value.getGroup().equals("Student"))
        {
        if(value.getDegree().equals("Bachelor"))
        {
           tp="1";
        }
        else if(value.getDegree().equals("Master"))
        {
           tp="2";
        }
        else if(value.getDegree().equals("Doctor"))
        {
           tp="3";
        }
        }
        else if(value.getGroup().equals("Teacher"))
        {
            tp="8";
        }
        else if(value.getGroup().equals("Staff"))
        {
            tp="9";
        }
        return tp;
    }

}
